greatest common divisor linear combination